#ifndef NEWMESSAGE_H
#define NEWMESSAGE_H
#include <QTextEdit>
#include <QColorDialog>
#include <QFileDialog>
#include <QCheckBox>
#include <QDialog>
#include <QLayout>
#include <QListWidgetItem>
#include <QAbstractButton>
#include <QFileIconProvider>
#include "EmailSuggest.h"
#include "Settings.h"


namespace Ui {
class NewMessage;
}

class NewMessage : public QDialog
{
    Q_OBJECT
    
public:
    explicit NewMessage(QWidget *parent = 0);
    ~NewMessage();
    QStringList accountsList;
signals:
    void Show(QString str);
private slots:
    void on_ToLabelButton_clicked();
    void TextFamily(const QString &family);
    void TextSize(const QString &p);
    void TextAlign(QAbstractButton *a);

    void on_boldTextButton_clicked();

    void on_italicTextButton_clicked();

    void on_underlineTextButton_clicked();

    void on_textColorButton_clicked();

    void on_backgroundTextColor_clicked();

    void on_addFileButton_clicked();
    void DeleteFile(QListWidgetItem* fn);

    void on_messageText_currentCharFormatChanged(const QTextCharFormat &format);

    void on_messageText_cursorPositionChanged();

    void AutoSuggest();

    void on_fromComboBox_currentIndexChanged(const QString &arg1);

private:
    Ui::NewMessage *ui;
    void AccountsComboBox();
    void CreateActions();
    void SetFormat(QTextCharFormat &format);
    void VisibleListAddFiles();
    void AddFiles(QStringList fn);

    QStringList addFilesPath;
    QString fromMail;
    EmailSuggest *suggest;
    Settings settings;



};

#endif // NEWMESSAGE_H
